home *** CD-ROM | disk | FTP | other *** search
/ Freelog Special Edition 13 / FreelogHS13.iso / P To P / Emule24b_Morph_Mod_V4b-binary / Webserver / eMule.js < prev    next >
Text File  |  2003-01-13  |  6KB  |  276 lines

  1. // Server
  2.  
  3. function connect(id)
  4. {
  5.     queue.pop("ServerConnect.emule?id="+id);
  6. }
  7.  
  8. function showserver()
  9. {
  10.     stopAllUpdates();
  11.     hideAllViews();
  12.     currentView="ServerView";
  13.     content.ServerView.style.visibility="visible";
  14.     content.resize();
  15.     content.servlist.showIt();
  16.   content.servinfo.showIt();
  17.   content.servlog.showIt();
  18.   updateServlist();
  19.   updateServerMsg();
  20.   updateServerLog();
  21.   setTimeout("reshowserver();",250)
  22. }
  23.  
  24. function reshowserver()
  25. {
  26.     hideAllViews();
  27.     content.ServerView.style.visibility="visible";
  28.     content.resize();
  29.     content.servlist.showIt();
  30.   content.servinfo.showIt();
  31.   content.servlog.showIt();
  32. }
  33.  
  34. function updateServlist()
  35. {
  36.   queue.pop("ServerListUpdate.emule");
  37. }
  38.  
  39. function updateServerlistRowSize(id,size)
  40. {
  41.   queue.pop("ServerListUpdateRowWidth.emule?id="+id+";size="+size);
  42. }
  43.  
  44. function ServerlistDblclick(id)
  45. {
  46.   connect(id);
  47. }
  48.  
  49. function deleteServer(id)
  50. {
  51.   queue.pop("ServerDelete.emule?id="+id);
  52. }
  53.  
  54. function setPrioOfServer(id,prio)
  55. {
  56.   queue.pop("ServerPriority.emule?id="+id+";prio="+prio);
  57. }
  58.  
  59. function updateServerMsg()
  60. {
  61.   queue.pop("ServerInfoUpdate.emule");
  62. }
  63.  
  64. function updateServerLog(startline)
  65. {
  66.   queue.pop("ServerLogUpdate.emule?startline="+startline);
  67. }
  68.  
  69. function addServer(ip, port, name)
  70. {
  71.   queue.pop("ServerNew.emule?ip="+ip+";port="+port+";name="+name);
  72. }
  73.  
  74. function refreshServer(servermet)
  75. {
  76.     queue.pop("ServerMetRefresh.emule?servermet="+servermet);
  77.   setTimeout("updateServlist();",20000);
  78. }
  79.  
  80. function setServerStatic(id, stat)
  81. {
  82.   queue.pop("ServerStatic.emule?id="+id+";static="+stat);
  83. }
  84.  
  85.  
  86. // Transfer
  87.  
  88. function showtransfer()
  89. {
  90.     stopAllUpdates();
  91.     hideAllViews();
  92.     currentView="TransferView";
  93.     content.resize();
  94.     content.TransferView.style.visibility="visible";
  95.     content.translist.showIt();
  96.     content.uplist.showIt();
  97.     updateDownlist();
  98.   updateUplist();
  99.   updateProgressbar();
  100. }
  101.  
  102. function setFilePrio(id,prio)
  103. {
  104.     queue.pop("TransferPriority.emule?id="+id+";prio="+prio);
  105. }
  106.  
  107. function setFileStatus(id,status)
  108. {
  109.     queue.pop("TransferStatus.emule?id="+id+";status="+status);
  110. }
  111.  
  112. function setCreateEd2kLink(id,html)
  113. {
  114.     queue.pop("TransferCreateEd2kLink.emule?id="+id+";html="+html);
  115. }
  116.  
  117. function clearComplete()
  118. {
  119.     queue.pop("TransferClearCompleted.emule");
  120. }
  121.  
  122. function updateDownlist()
  123. {
  124.     queue.pop("TransferDownListUpdate.emule");
  125. }
  126.  
  127. function updateDownloadlistRowSize(id,size)
  128. {
  129.   queue.pop("TransferDownListUpdateRowWidth.emule?id="+id+";size="+size);
  130. }
  131.  
  132. function updateUplist()
  133. {
  134.     queue.pop("TransferUpListUpdate.emule");
  135. }
  136.  
  137. function updateUploadlistRowSize(id,size)
  138. {
  139.   queue.pop("TransferUpListUpdateRowWidth.emule?id="+id+";size="+size);
  140. }
  141.  
  142. function updateProgressbar()
  143. {
  144.   queue.pop("TransferRenderProgressBar.emule?id=0");
  145. }
  146.  
  147. function fakeCheck(no,id)
  148. {
  149.   queue.pop("TransferFakecheck.emule?id="+id+";no="+no);
  150. }
  151.  
  152. function loadSources(id)
  153. {
  154.   queue.pop("TransferLoadSources.emule?id="+id);
  155. }
  156.  
  157. function saveSources(id)
  158. {
  159.   queue.pop("TransferSaveSources.emule?id="+id);
  160. }
  161.  
  162. function dropSources(id)
  163. {
  164.   queue.pop("TransferDropSources.emule?id="+id);
  165. }
  166.  
  167.  
  168. // Search
  169.  
  170. function showsearch()
  171. {
  172.   stopAllUpdates();
  173.     hideAllViews();
  174.     currentView="SearchView";
  175.     content.resize();
  176.     content.SearchView.style.visibility="visible";
  177.     content.slist.showIt();
  178. }
  179.  
  180. function enterED2KLink(link)
  181. {
  182.     queue.pop("SearchEnterED2KLink.emule?ed2k="+link);
  183. }
  184.  
  185. function startWebSearch(name, type)
  186. {
  187.   var adr=encodeURI("http://www.filedonkey.com/fdsearch/index.php?media="+type+"&pattern="+name);
  188.   window.open(adr,"_blank");
  189.   content.in_webname.value="";
  190. }
  191.  
  192. function startSearch(name, global, min, max, type)
  193. {
  194.   queue.pop("SearchStart.emule?name="+name+";global="+global+";min="+min+";max="+max+";type="+type);
  195. }
  196.  
  197. function updateSearchlistRowSize(id,size)
  198. {
  199.   queue.pop("SearchListUpdateRowWidth.emule?id="+id+";size="+size);
  200. }
  201.  
  202. // Shared View
  203.  
  204. function showshared()
  205. {
  206.   alert("Not implemneted yet");
  207. }
  208.  
  209. // Messages View
  210.  
  211. function showmessages()
  212. {
  213.   alert("Not implemneted yet");
  214. }
  215.  
  216. // IRC View
  217.  
  218. function showirc()
  219. {
  220.   alert("Not implemneted yet");
  221. }
  222.  
  223. // Statistics View
  224.  
  225. function showstatistics()
  226. {
  227.   alert("Not implemneted yet");
  228. }
  229.  
  230. // Preferences View
  231.  
  232. function showpreferences()
  233. {
  234.   window.open("preferences.emule","preferences","dependent=yes,width=800,height=600,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no");
  235. }
  236.  
  237. // All Views
  238.  
  239. function toggleHeadline(tabcol,value)
  240. {
  241.   queue.pop("toggleHeadline.emule?tabcol="+tabcol+";value="+value);
  242. }
  243.  
  244. function hideAllViews()
  245. {
  246.   content.ServerView.style.visibility="hidden";
  247.   content.servlist.hideIt();
  248.   content.servinfo.hideIt();
  249.   content.servlog.hideIt();
  250.   content.TransferView.style.visibility="hidden";
  251.   content.translist.hideIt();
  252.   content.uplist.hideIt();
  253.   content.SearchView.style.visibility="hidden";
  254.   content.slist.hideIt();
  255. }
  256.  
  257. timerServerInfo=false;
  258. timerServerLog=false;
  259. timerDownloadList=false;
  260. timerUploadList=false;
  261. timerImageRender=false;
  262. currentView="";
  263.  
  264. function stopAllUpdates()
  265. {
  266.   if(timerServerInfo)
  267.     window.clearTimeout(timerServerInfo);
  268.   if(timerServerLog)
  269.     window.clearTimeout(timerServerLog);
  270.   if(timerDownloadList)
  271.     window.clearTimeout(timerDownloadList);
  272.   if(timerUploadList)
  273.     window.clearTimeout(timerUploadList);
  274.   if(timerImageRender)
  275.     window.clearTimeout(timerImageRender);
  276. }